package com.six.order.controller;

import com.six.core.vo.Result;
import com.six.order.service.impl.WeiXinService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:
 * @author:LiWei
 * @date:2023年03月04日10:21
 */
@RestController
@RequestMapping("order/weixin")
public class WeiXinController {

    @Autowired
    private WeiXinService weiXinService;

    //根据订单id创建订单
    @GetMapping("createNative/{orderId}")
    public Result createNative(@PathVariable String orderId){
        return weiXinService.createNative(orderId);

    }

    //根据订单id查询订单状态
    @GetMapping("queryPayState/{orderId}")
    public Result queryPayState(@PathVariable String orderId){
        return weiXinService.queryPayState(orderId);
    }

}
